import Vue from 'vue'
import VueRouter from 'vue-router'
import bar from '../components/fChart/bar.vue'
import flod from "../components/fChart/flod";
import home from '../components/Home/home'
import Login from '../components/Login'
import Welcome from '../components/Welcome'
import Anli from "../components/other/example"
import hbar from "../components/hChart/3D bar"
import hscatter from"../components/hChart/3D Scatter"
import Sunburst from "../components/lChart/Sunburst"
import Tree from "../components/lChart/Tree"
import graph from '../components/jChart/guanxitu'
import scroll from "../components/jChart/scroll"
import ditu from "../components/jChart/ditu"
import JTree from "../components/lChart/JTree";
import CreateChart from "../components/CreateEcharts/CreateChart";

import cbar from"../components/CreateEcharts/bar"
import cline from"../components/CreateEcharts/line"
import Cradar from "../components/CreateEcharts/radar"
import Cgraph from "../components/CreateEcharts/graph"
import dui from "../components/CreateEcharts/dui"
import pie from "../components/CreateEcharts/pie"
import JTrees from "../components/CreateEcharts/JTrees"
import Trees from "../components/CreateEcharts/Trees"
import sandians from "../components/CreateEcharts/sandians"
Vue.use(VueRouter)

const routes = [
  {
    path:"/",
    component:Login
  },
  {
    path: "/home",
    component: home,
    redirect: "/case",/*welcome*/
    children:[
      {path:"/case",component: Anli},
      {path:"/welcome",component:Welcome},
      {path: "/bar",component: bar},
      {path: "/flod",component: flod},
      {path: "/Sunburst",component: Sunburst},
      {path: "/Tree",component: Tree},
      {path: "/graph",component: graph},
      {path: "/scroll",component: scroll},
      {path: "/3Dbar",component: hbar},
      {path: "/3Dscatter",component: hscatter},
      {path: "/JTree",component: JTree},
      {path: "/map",component: ditu},
      {path:"/CreateEcharts/sandians", component:sandians},
      {path:"/CreateEcharts/Trees", component:Trees},
      {path:"/CreateEcharts/JTrees", component:JTrees},
      {path:"/CreateEcharts/bar", component:cbar},
      {path:"/CreateEcharts/line", component:cline},
      {path:"/CreateEcharts/radar", component:Cradar},
      {path:"/CreateEcharts/graph", component:Cgraph},
      {path:"/CreateEcharts/dui", component:dui},
      {path:"/CreateEcharts/pie", component:pie},
      {path: "/CreateChart",component: CreateChart,
        meta:{
          keepAlive:true,
          isBack: false
        },
      },
    ]
  },

]

const router = new VueRouter({
  routes
})

export default router
